#ifndef __POINT_H__
#define __POINT_H__

#include <iostream>
#include "MyScreen.h"
#include "Gotoxy.h"

using namespace std;

void gotoxy(int, int); // prototype

class Point
{
	int m_x, m_y;
public:
	Point (int x, int y) : m_x(x), m_y(y){};
	Point (): m_x(0), m_y(0){};
	void set(int x1, int y1);
	void input();
	int getx()const {return m_x;}
	int gety()const {return m_y;}
	bool draw (char c) const ;
	void clear() const ;
	int isPointInBorders(Point &DR,Point &UL) const;
	// global function to handle point printing
	static bool isValidPrintPoint (const int x, const int y)  {return (x >= MIN_SCREEN_X && x < MAX_SCREEN_X && y >= MIN_SCREEN_Y && y < MAX_SCREEN_Y);}
	static bool checkIfPointOnScr (const Point & p , const MyScreen & scr);
	static void printPoint (const Point p, MyScreen * scr = NULL, char frameCh = '*');
	
};


#endif

